﻿
<?php
	class countUser extends CWidget{
		public function run(){
			//select and count user
			$count = Yii::app()->db->createCommand('SELECT COUNT(*) FROM users')->queryScalar();
			$sql='SELECT * WHERE users';
			$dataProvider= new CSqlDataProvider($sql,array(
				'totalItemCount'=>$count		
			));
		//end select
		//$this->render(array('dataProvider'=>$dataProvider));
		echo "Số Thành Viên: ".$count;
		}
	}
?>